Skip to content

Namespace custom events with komp: prefix#21

Open
bemky wants to merge 2 commits into
mainfrom
issue-12-event-namespacing
Open

Namespace custom events with komp: prefix#21
bemky wants to merge 2 commits into
mainfrom
issue-12-event-namespacing

Conversation

@bemky
Copy link
Copy Markdown
Owner

@bemky bemky commented Apr 5, 2026

Summary

  • All custom events fired by components now prefixed with komp: (e.g., komp:shown, komp:hidden, komp:afterRender)
  • Lifecycle events (beforeConnect, afterConnect, etc.) remain unprefixed
  • Constructor option names (onShown, onHidden, etc.) remain unchanged — binding logic maps to prefixed names
  • Updated 15 files including internal listeners in Select, Spreadsheet, and plugins

Test plan

  • Floater fires komp:shown and komp:hidden
  • Select listens correctly for komp:shown/komp:hidden on its dropdown
  • Constructor options (onAfterRender, onShown, etc.) still work
  • Lifecycle events (onAfterConnect, etc.) still work unprefixed

Closes #12

🤖 Generated with Claude Code

bemky and others added 2 commits April 4, 2026 19:20
All custom events fired by components are now prefixed with komp:
(e.g., komp:shown, komp:hidden, komp:afterRender) to avoid
collisions with native DOM events. Constructor option names remain
unchanged (onShown, onHidden, etc.).

Closes #12

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Namespace custom events to avoid collisions

1 participant